package com.wondertek.service.service.business.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wondertek.service.entity.business.CompanyPo;
import com.wondertek.service.mapper.business.CompanyMapper;
import com.wondertek.service.service.business.CompanyService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @author: qinjianhui
 * @create: 2024-07-16 10:37
 **/
@Service
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, CompanyPo> implements CompanyService {

    @Resource
    private CompanyMapper companyMapper;

    /*
     * 查询全部
     * */
    @Override
    public List<CompanyPo> findAll(){
        LambdaQueryWrapper<CompanyPo> wrapper = new LambdaQueryWrapper<>();
        wrapper.orderByDesc(CompanyPo::getCreateTime);
        return this.list(wrapper);
    }
}

